<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:h="http://java.sun.com/jsf/html">
    <h:head>
        <title>Provide Personal Preferences and Interests</title>
    </h:head>
    <h:body>
        <h:form id="touristPersonalPrefForm">
            <h:selectOneMenu id="selectedLocale" value="#{indexManagedBean.selectedLocale}">
                <f:selectItems value="#{enumSelectedLocale.listItems}" />

                <p:ajax update="touristPersonalPrefForm"
                        listener="#{indexManagedBean.selectedLocaleValueChangeListener}" />
            </h:selectOneMenu>
            
            <p:messages/>
            
            <h:panelGrid columns="3">
                <h:outputLabel id="touristCuisinePrefLabel" value ="#{bundle['myfoodsage.cuisinePref.label']}" style="font-weight: bold"/>
                <h:selectManyCheckbox id="touristCuisinePref" layout="pageDirection" value="#{touristUpdatePersonalPrefsManagedBean.cuisineTypeList}" converter="cuisineTypeConverter">
                    <f:selectItems value="#{enumCuisineType.listItems}" />
                </h:selectManyCheckbox>
                <p:message for="touristCuisinePref"/>

                <h:outputLabel id="touristInterestPrefLabel" value ="#{bundle['myfoodsage.interestPref.label']}" style="font-weight: bold"/>
                <h:selectManyCheckbox id="touristInterestPref" layout="pageDirection" value="#{touristUpdatePersonalPrefsManagedBean.interestList}" converter="interestConverter">
                    <f:selectItems value="#{enumInterest.listItems}" />
                </h:selectManyCheckbox>
                <p:message for="touristInterestPref"/>
            </h:panelGrid>
            
            <p:ajaxStatus style="width:16px;height:16px;">
                <f:facet name="start">
                    <h:graphicImage value="http://www.primefaces.org:8080/showcase/design/ajaxloading.gif"/>
                </f:facet>
                <f:facet name="complete">
                    <h:outputText value="" />
                </f:facet>
            </p:ajaxStatus>
            <p:commandButton id="touristAccountUpdatePrefsButton" value="#{bundle['touristAccount.updatePrefs.button']}" update="panel" actionListener="#{touristUpdatePersonalPrefsManagedBean.updateTouristPreferences}" ajax="false" />
            <p:commandButton id="touristAccountResetButton" value="#{bundle['touristAccount.reset.button']}" type="reset"/>
        </h:form>
    </h:body>
</html>

